package com.ybkj.daijia.server.model;

import java.math.BigDecimal;

/**
 * 提成详细表
 *
 * @author Shine
 */
public class DriverLevelDetail extends Base {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    private BigDecimal commission;// 比例提成

    private BigDecimal money;// 固定提成

    private BigDecimal minCommission;// 最低提成值

    private BigDecimal lowCommission;// 低于minCommission元提lowCommission元

    private BigDecimal minMoney;// 最低提成值

    private BigDecimal lowMoney;// 低于minMoney元提lowMoney元

    private DriverLevelType driverLevelType; // 提成方式

    private Integer startHour;// 开始时间 时

    private Integer startMinute;// 开始时间 分

    private Integer endHour;// 结束时间 时

    private Integer endMinute;// 结束时间 分

    private Long driverLevelId;

    public BigDecimal getCommission() {
        return commission;
    }

    public void setCommission(BigDecimal commission) {
        this.commission = commission;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public DriverLevelType getDriverLevelType() {
        return driverLevelType;
    }

    public void setDriverLevelType(DriverLevelType driverLevelType) {
        this.driverLevelType = driverLevelType;
    }

    public Integer getStartHour() {
        return startHour;
    }

    public void setStartHour(Integer startHour) {
        this.startHour = startHour;
    }

    public Integer getStartMinute() {
        return startMinute;
    }

    public void setStartMinute(Integer startMinute) {
        this.startMinute = startMinute;
    }

    public Integer getEndHour() {
        return endHour;
    }

    public void setEndHour(Integer endHour) {
        this.endHour = endHour;
    }

    public Integer getEndMinute() {
        return endMinute;
    }

    public void setEndMinute(Integer endMinute) {
        this.endMinute = endMinute;
    }

    public Long getDriverLevelId() {
        return driverLevelId;
    }

    public void setDriverLevelId(Long driverLevelId) {
        this.driverLevelId = driverLevelId;
    }

    public BigDecimal getMinCommission() {
        if (null == minCommission) {
            return BigDecimal.ZERO;
        }
        return minCommission;
    }

    public void setMinCommission(BigDecimal minCommission) {
        this.minCommission = minCommission;
    }

    public BigDecimal getMinMoney() {
        if (null == minMoney) {
            return BigDecimal.ZERO;
        }
        return minMoney;
    }

    public void setMinMoney(BigDecimal minMoney) {
        this.minMoney = minMoney;
    }

    public BigDecimal getLowCommission() {
        if (null == lowCommission) {
            return BigDecimal.ZERO;
        }
        return lowCommission;
    }

    public void setLowCommission(BigDecimal lowCommission) {
        this.lowCommission = lowCommission;
    }

    public BigDecimal getLowMoney() {
        if (null == lowMoney) {
            return BigDecimal.ZERO;
        }
        return lowMoney;
    }

    public void setLowMoney(BigDecimal lowMoney) {
        this.lowMoney = lowMoney;
    }

    public boolean isEmpty() {

        if (null == startHour || null == startMinute || null == endHour
            || null == endMinute || null == driverLevelType
            || null == money || null == commission) {
            return true;
        }
        return false;
    }

    public enum DriverLevelType {
        /**
         * 比例提成
         */
        ticheng,
        /**
         * 固定提成
         */
        guding
    }
}
